package com.javastar.common.utils;

import com.javastar.modules.security.bean.SysUserDetails;
import org.springframework.security.core.Authentication;

/**
 * 用户持有工具类
 *
 * @author zxx
 * @date 2023/7/25
 */
public class UserHolderUtil {
    public static SysUserDetails getUserDetailsFromAuthentication(Authentication authentication) {
        return (SysUserDetails) authentication.getPrincipal();
    }
}
